<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>CSS背景</title>
  <style>
    div{
      width: 200px;
      height: 200px;
     background-color: green;/*背景颜色*/
    }

    .adiv{
      width: 1000px;
      height: 1000px;
      background-image: url("../images/pic.jpeg");/*背景图片*/
    }

    .bdiv{
        width: 1000px;
        height: 1000px;
        background-color: blue;
        background-image: url("../images/pic.jpeg");
        /*默认平铺*/
        background-repeat: no-repeat;/*背景图片不平铺*/
        /*background-repeat: repeat-x;沿着X轴平铺*/
        /*background-repeat: repeat-y;沿着Y轴平铺*/
    }
  </style>
</head>
<body>
<div></div>
<div class="adiv"></div>
<div class="bdiv"></div>
</body>
</html>